from fastapi import FastAPI, Depends
from fastapi.staticfiles import StaticFiles
from pathlib import Path
from sqlalchemy.orm import Session

from app.api.v2 import harp_router, sozluk
from app.db.database import engine, get_db
from app.models import harp
from app.schemas import harp_schemas

app = FastAPI()
# 上传文件
app.mount("/uploads/harp", StaticFiles(directory="./uploads/harp"), name="uploads")
app.mount("/uploads/sozluk", StaticFiles(directory="./uploads/sozluk"), name="uploads")

# 创建数据表
harp.Base.metadata.create_all(bind=engine)

app.include_router(harp_router.router)
app.include_router(sozluk.router)
